﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">

    <link href="@Url.Content("~/Themes/default/easyui.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Themes/icon.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.8.0.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.easyui.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Locale/easyui-lang-zh_CN.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/Common.js")" type="text/javascript"></script>

    <title>@ViewBag.Title</title>
    @RenderSection("Head", required: false)
    <style type="text/css">
        table td {
            font-size: 10pt;
            font-family: "宋体";
        }

            table td input[type=text] {
                width: 195px;
            }

            table td textarea {
                width: 99%;
            }

        .ftitle {
            font-size: 14px;
            font-weight: bold;
            padding: 5px 0;
            margin-bottom: 10px;
            border-bottom: 1px solid #ccc;
        }
    </style>
</head>
<body>
    <div id="Dlg-Edit" style="margin: 5px; padding: 10px; margin-top: 0px;">
        @RenderBody()
    </div>
</body>
</html>

<script type="text/javascript">
    var dlg_Edit;
    var dlg_Edit_form;
    var dlg_Edit_form_submitEvent;
    $(document).ready(function () {
        dlg_Edit_form = $("#Dlg-Edit").find('form');
        
        $(".editor").each(function () {

            var obj = $(this);

            var editor = new UE.ui.Editor();

            editor.render(obj.attr('id'));

            editor.addListener('selectionchange', function (editor2) {
               
                obj.val( editor.getContent());
       
            });
        });
    });



    var win;
    function saveData(callback) {

        dlg_Edit_form.form('submit', {

            onSubmit: function () {

                var r = dlg_Edit_form.form('validate');
                if (dlg_Edit_form_submitEvent) {
                    r = dlg_Edit_form_submitEvent();
                }
                //alert(r);
                return r;
            },
            onLoadSuccess: function () {

            },
            onBeforeLoad: function () {

            },
            success: function (result) {

                if (result != undefined) {
                    //result为请求处理后的返回值    
                    var result = $.parseJSON(result);
                    var flag = false;
                    if (result.success) {
                        $.messager.alert('提交成功', result.msg, 'info', function () {
                            if (callback)
                                callback(true);
                        });



                    } else {
                        $.messager.alert('错误提示', result.msg, 'error', function () {
                            if (callback)
                                callback(false);
                        });

                    }

                }
            }

        });
    }
</script>
@RenderSection("Script", required: false)

<script>
    window["__flash__removeCallback"] = function (instance, name) {
        try {
            if (instance) {
                instance[name] = null;
            }
        } catch (flashEx) {

        }
    };
   
       
</script>